from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException, TimeoutException
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait

import pytest
import requests
import yaml
import logging
from common.readyaml import *



@pytest.fixture
def test_createdriver():
    dr = '[驱动对象]'
    # print(f"\n创建{dr},启动浏览器")
    print('创建,启动浏览器'.format(dr))
    yield dr
    print('终止{}，退出浏览器'.format(dr))


# @pytest.fixture(scope='function')

def boss_info():
    a = read_yaml()


def email_info():
    a = read_yaml()
    EMAIL_INFO = {
        'username': a['Email']['email_account'],
        'password': a['Email']['password'],
        'smtp_host': a['Email']['smtp_host'],
        'smtp_port': a['Email']['smtp_port']
    }
    return EMAIL_INFO


# if __name__ == '__main__':
#     print(email_info().values())


def chat_hr_send_sms():
    sms = '本人想重新找个自动化岗位'